import {useDispatch, useSelector} from "react-redux";
import {AppState} from "../index";
import {updateV1} from "./action";

export function useV1(): boolean {
  return useSelector((state: AppState) => state.v1action.v1);
}

export function useUpdateV1(v1:boolean){
  const dispatch = useDispatch();
  dispatch(updateV1({v1:v1}));
}
